import { getT } from '../api/login';

export default {
  state: {
    loginData: null,
  },
  effects: {
    *loginSaga({ payload }, { put, call }) {
      const res = yield call(getT, payload);
      // console.log(res);
      yield put({ type: 'initUsers', payload: res });
    },
  },
  reducers: {
    initUsers(state, action) {
      state.loginData = action.payload;
      return state
    },
  },
};
